﻿using S_Incident.Domains.EventHandling;
using S_Incident.Domains.WorkflowEngine;
using S_Userinfor.Domains;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace S_Incident.Infrasturctre
{
    public class SqlSugarInfor
    {
        private readonly ISqlSugarClient sqlSugarClient;
        public SqlSugarInfor( ISqlSugarClient sqlSugarClient)
        {
            this.sqlSugarClient = sqlSugarClient;
        }
        public void CreateTable()
        {
            sqlSugarClient.DbMaintenance.CreateDatabase();
            sqlSugarClient.CodeFirst.SetStringDefaultLength(50).BackupTable().InitTables(new Type[]
            {
                typeof(FormManagement),
                typeof(Process),
                typeof(Node),
                typeof(EventDisposition),
            });
        }
    }
}
